package org.helloworld.activity;

import org.helloworld.model.HelloWorld;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MainActivity extends Activity {

	EditText Name;
	TextView Result; 
	Button Proceed; 

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

		Name = (EditText) findViewById(R.id.etxName);
		Result = (TextView) findViewById(R.id.txtResultado);
		Result.setText("");

		Proceed = (Button) findViewById(R.id.btnProceed);
		Proceed.setOnClickListener(new View.OnClickListener() {

			public void onClick(View arg0) {
				Result.setText(HelloWorld.sayHello(Name.getText().toString()));
			}

		});
	}

}
